home *** CD-ROM | disk | FTP | other *** search
/ More Anime Pin-Up Beauties / More Anime Pin-Up Beauties.iso / mac / WEST / GPX04.dir / 00194_Script_194 < prev    next >
Text File  |  1998-06-22  |  8KB  |  255 lines

  1. -- Standard Services
  2.  
  3. -- ++++++++++++++++++++++++++++++++ clear Picture of cast vCast
  4. on clrPicture vCast
  5.     set the picture of cast vCast to the picture of cast "EmptyPict"
  6.  
  7. -- ++++++++++++++++++++++++++++++++ getText from fileName
  8. on getText fileName
  9.     put FileIO(mNew,"read",fileName) into vText
  10.     if objectp(vText) then
  11.         put vText(mReadFile) into retText
  12.         vText(mDispose)
  13.     else
  14.         put "" into retText
  15.     end if
  16.     return (retText)
  17.  
  18. -- ++++++++++++++++++++++++++++++++ getPicture from fileName to vCast
  19. on getPicture vCast, vfileName
  20.     put vfileName & ".PIC" into fileName
  21.     if (the name of cast vCast <> "") then
  22.         set nameOfCast to the name of cast vCast
  23.     else
  24.         set nameOfCast to ""
  25.     end if
  26.     put FileIO(mNew,"read",fileName) into vPict
  27.     if (not objectp(vPict)) then
  28.         alert "Error(getPicture):"&fileName&RETURN&"code:"&vPict
  29.         return (FALSE)
  30.     end if
  31.     set the picture of cast vCast to vPict(mReadPict)
  32.     if (the size of cast vCast = 0) then
  33.         clrPicture(vCast)
  34.         set the name of cast vCast to nameOfCast
  35.         unload
  36.         unloadCast
  37.         set the picture of cast vCast to vPict(mReadPict)
  38.         if (the size of cast vCast = 0) then
  39.             clrPicture(vCast)
  40.             set the name of cast vCast to nameOfCast
  41.             vPict(mDispose)
  42.             alert "Error(getPicture):"&fileName&RETURN&"code:"&vPict&RETURN&"Not enough Memory"
  43.             return (FALSE)
  44.         end if
  45.     end if
  46.     vPict(mDispose)
  47.     return(TRUE)
  48.     
  49. -- ++++++++++++++++++++++++++++++++ set vSprite as Pict for vCast(BitMap) with vInk
  50. on setPictSprite vSprite, vCast, vInk
  51.     if the type of sprite vSprite = 0 then set the type of sprite  vSprite to 1
  52.     puppetSprite vSprite ,TRUE
  53.     set the castNum of sprite vSprite to the number of cast vCast
  54.     set the ink of sprite vSprite to vInk
  55.  
  56. -- ++++++++++++++++++++++++++++++++ set vSprite as Text vCast(Text) with vInk locate vH vV
  57. on setTextSprite vSprite, vCast, vInk, vH, vV
  58.     if the type of sprite vSprite = 0 then set the type of sprite  vSprite to 7
  59.     puppetSprite vSprite ,TRUE
  60.     set the castNum of sprite vSprite to the number of cast vCast
  61.     set the ink of sprite vSprite to vInk
  62.     set the locH of sprite vSprite to vH
  63.     set the locV of sprite vSprite to vV
  64.  
  65. -- ++++++++++++++++++++++++++++++++ control button
  66. on pushButton com
  67.     put the locH of sprite clickOn() into vH
  68.                 put the locV of sprite clickOn() into vV
  69.     repeat while stilldown()
  70.         if rollover(clickOn()) then
  71.             set the locH of sprite clickOn() to vH + 2
  72.             set the locV of sprite clickOn() to vV + 2
  73.         else
  74.             set the locH of sprite clickOn() to vH
  75.             set the locV of sprite clickOn() to vV
  76.         end if
  77.         upDateStage
  78.     end repeat
  79.     set the locH of sprite clickOn() to vH
  80.     set the locV of sprite clickOn() to vV
  81.     upDateStage
  82.     if rollOver(clickOn()) then do com
  83.  
  84. -- ++++++++++++++++++++++++++++++++ QTmovie forward to End button
  85. on qtEnd vSprite
  86.     put (the duration of cast (the castNum of sprite vSprite)) into vLen
  87.     set the movieTime of sprite vSprite to vLen - 1
  88.     set the movieRate of sprite vSprite to 0
  89.     upDateStage
  90.  
  91. -- ++++++++++++++++++++++++++++++++ QTmovie rewind to Top button
  92. on qtTop vSprite
  93.     set the movieTime of sprite vSprite to 0
  94.     set the movieRate of sprite vSprite to 0
  95.     set the startTime of sprite vSprite to 0
  96.     upDateStage
  97.  
  98. -- ++++++++++++++++++++++++++++++++ QTmovie rewind to vTop button
  99. on XqtTop vSprite, vTop
  100.     set the movieTime of sprite vSprite to vTop
  101.     set the movieRate of sprite vSprite to 0
  102.     set the startTime of sprite vSprite to vTop
  103.     upDateStage
  104.  
  105. -- ++++++++++++++++++++++++++++++++ QTmovie rewind(10sec) button
  106. on qtRew vSprite
  107.     put the movieTime of sprite vSprite into vTime
  108.     if (vTime > 600) then
  109.         put (vTime - 600) into vTime
  110.     else
  111.         put 0 into vTime
  112.     end if
  113.  
  114.     set the movieTime of sprite vSprite to vTime
  115.     upDateStage
  116.  
  117. -- ++++++++++++++++++++++++++++++++ QTmovie rewind(10sec but limit) button
  118. on XqtRew vSprite, vTop
  119.     put the movieTime of sprite vSprite into xTime
  120.     put (xTime - vTop) into vTime
  121.     if (vTime > 600) then
  122.         put (xTime - 600) into vTime
  123.     else
  124.         put vTop into vTime
  125.     end if
  126.  
  127.     set the movieTime of sprite vSprite to vTime
  128.     upDateStage
  129.  
  130. -- ++++++++++++++++++++++++++++++++ QTmovie forward(10sec) button
  131. on qtFwd vSprite
  132.     put the movieTime of sprite vSprite into vTime
  133.     put (the duration of cast (the castNum of sprite vSprite)) into vLen
  134.     if ((vLen - vTime)>600) then
  135.         put (vTime + 600) into vTime
  136.     else
  137.         put (vLen - 1) into vTime
  138.     end if
  139.  
  140.     set the movieTime of sprite vSprite to vTime
  141.     upDateStage
  142.  
  143. -- ++++++++++++++++++++++++++++++++ QTmovie forward(10sec but limit) button
  144. on XqtFwd vSprite, vEnd
  145.     put the movieTime of sprite vSprite into vTime
  146.     if ((vEnd - vTime)>600) then
  147.         put (vTime + 600) into vTime
  148.     else
  149.         put vEnd into vTime
  150.     end if
  151.  
  152.     set the movieTime of sprite vSprite to vTime
  153.     upDateStage
  154.  
  155. -- ++++++++++++++++++++++++++++++++ QTmovie pause button
  156. on qtPau vSprite
  157.     global gAviTime
  158.  
  159.     if (the movieRate of sprite vSprite = 0) then
  160.         if (the movieTime of sprite vSprite > 0) then
  161.             put the movieTime of sprite vSprite into gAviTime
  162.             set the movieRate of sprite vSprite to 1
  163.         end if
  164.  
  165.     else
  166.         set the movieRate of sprite vSprite to 0
  167.     end if
  168.  
  169.     upDateStage
  170.  
  171. -- ++++++++++++++++++++++++++++++++ QTmovie Stop button
  172. on qtStp vSprite
  173.     set the movieRate of sprite vSprite to 0
  174.     upDateStage
  175.  
  176. -- ++++++++++++++++++++++++++++++++ QTmovie play button
  177. on qtPly vSprite
  178.     set the movieRate of sprite vSprite to 1
  179.     upDateStage
  180.  
  181. -- ++++++++++++++++++++++++++++++++ QTmovie yalp(reverse play) button
  182. on qtYlp vSprite
  183.     set the movieRate of sprite vSprite to -1
  184.     updateStage
  185.  
  186. -- ++++++++++++++++++++++++++++++++ QTmovie sound toggle
  187. on qtSoundToggle
  188.     if the sound of cast (the castNum of sprite clickOn()) = TRUE then
  189.         set the sound of cast (the castNum of sprite clickOn()) = FALSE
  190.     else
  191.         set the sound of cast (the castNum of sprite clickOn()) = TRUE
  192.     end if
  193.  
  194. -- ++++++++++++++++++++++++++++++++ AIFF sound file control in soundchannel 2
  195. on aiffSound vNum
  196.     global gPathAiff
  197.     global gBgmNum
  198.     if the soundEnabled = FALSE then
  199.         return
  200.     end if
  201.  
  202.     if vNum = 0 then
  203.             if soundBusy(1) then
  204.                 sound stop 1
  205.             end if
  206.  
  207.         put 0 into gBgmNum
  208.     else
  209.         if soundBusy(1) AND gBgmNum = vNum then
  210.             return
  211.         end if
  212.  
  213.         sound playFile 1, gPathAiff & "BGM0" & string(vNum) & ".AIF"
  214.         put vNum into gBgmNum
  215.     end if
  216.  
  217. -- Fade out other channel
  218. on aiffFadeOut vNum
  219.     repeat with n = 1 to 4
  220.         if  (vNum <> n) then
  221.             if soundBusy(n) then
  222.                 sound fadeOut n, 60
  223.             end if
  224.         end if
  225.     end repeat
  226.  
  227. -- wait click (or vTim seconds)
  228. on clickWait vTim
  229.     startTimer
  230.     repeat while TRUE
  231.         if (the timer > (vTim*60)) then
  232.             exit repeat
  233.         end if
  234.         if (the mouseDown) then return(FALSE)
  235.     end repeat
  236.     return(TRUE)
  237.  
  238. --+++++++++++++++++++++++++++++++++ Palette change at black frame
  239. on chgScene vPal, vFrm, vBackName
  240.     global gFulCol
  241.     global gCurPal
  242.  
  243.     --if (gFulCol = 0) and (gCurPal <> vPal) then
  244.     --    go to frame "PALCHN"
  245.     --end if
  246.  
  247.     put vPal into gCurPal
  248.     puppetPalette vPal
  249.     puppetTransition 23
  250.     upDateStage
  251.     getPicture(the number of cast "BCK.PICT", vBackName)
  252.     puppetTransition 23
  253.     go to frame vFrm
  254.     upDateStage
  255.